// 1.先引入样式重置表
require('../../assets/css/index.js');

// 引入字体图标
require('../../assets/iconfonts/iconfont.css')


//2.引入当前页面样式
require('./dynamic.less');


// 3.辅助类功具函数
let dom=require('../../utils/dom');
let http=require('../../utils/http');

http.getygc()
// 4.当前页面的js文件
dom.ready(function(){
 // 显示底部菜单
    backBtn.addEventListener('click',function(){
        window.history.go(-1)
    })

    dom.getEl('#UserPic').addEventListener('click',function(){
        dom.getEl('#foundfile').click();
    })
    dom.getEl('#foundfile').addEventListener('change',function(){

        let fileval = this.files[0]
        http.uploadpic('file',fileval,'/api/shared/uploadPortrait1','ygc',function(res){
            if(res.errno==0){
                dom.getEl('#UserPic').src = http.baseURL+res.data.url
            }
        })
        
    })
})